package com.ky.gp.app.controller;

import com.ky.common.vo.R;
import com.ky.gp.app.service.WordBookFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * --- 天道酬勤 ---
 *
 * @author fhn
 * @date 2024/6/21
 * @desc -- 代码敲烂 月薪过万--
 */
@RestController
@RequestMapping("/api/home")
public class WordBookController {
    @Autowired
    WordBookFeign wordBookFeign;
    @RequestMapping("/wordBook/getWordBook")
    public R getWordBook() {
        return wordBookFeign.getWordBook();
    }
    @RequestMapping("/wordBook/updateWordBook/{id}")
    public R updateWordBook(@PathVariable("id")int id) {
        return wordBookFeign.updateWordBook(id);
    }
    @RequestMapping("/wordBook/selectAllWordBook")
    R selectAllWordBook(){
        return wordBookFeign.selectAllWordBook();
    }
}
